import axios from 'axios'
import common from '../common'
const token = sessionStorage.getItem("token")
export default {
    doSearch(query) {
        return common.axiosPost('/Ashop/shopList', query)
    },
    addShop(query) {
        return common.axiosPost('/Ashop/addShop', query)
    },
    editShop(query) {
        return common.axiosPost('/Ashop/editShop', query)
    },
    getDetail(query) {
        return common.axiosPost('/Ashop/shopInfo', query)
    },
    auditShop(query) {
        return common.axiosPost('/Ashop/auditShop', query)
    },
    toggleShop(query) {
        return common.axiosPost('/Ashop/toggleShop', query)
    },
    getStoreList(query) {
        return common.axiosPost('/Ashop/storeList', query)
    },
    addStrore(query) {
        return common.axiosPost('/Ashop/addStore', query)
    },
    editStrore(query) {
        return common.axiosPost('/Ashop/editStore', query)
    },
    getRegionList(query) {
        return axios.get('/Common/regionList?token='+token + '&parent_id=' + query.parent_id)
            .then(res => {
                return res.data
            }).catch(error => {
                console.log(error)
            })
    }
}
